# Maintainer: Filipe Laíns (FFY00) <filipe.lains@gmail.com>
# Contributor: Michal Krenek (Mikos) <m.krenek@gmail.com>

pkgname=serialdv
pkgver=1.1.4
pkgrel=3
pkgdesc='C++ interface to encode/decode audio with AMBE3000 based devices in packet mode'
arch=('loong64' 'x86_64')
url='https://github.com/f4exb/serialDV'
license=('GPL3')
makedepends=('cmake')
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha512sums=('879b2ae84a18ca4f4e0eda72208b596a9988e32eba0b3be4b5818b15b600d71c3ee53e6215126ff013d993237d29077ffedfb6be0477c852d4215e5e036bebc9')

build() {
  mkdir -p "$srcdir"/serialDV-$pkgver/build
  cd "$srcdir"/serialDV-$pkgver/build

  cmake .. \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr

  make
}

package() {
  cd "$srcdir"/serialDV-$pkgver/build

  make DESTDIR="$pkgdir" install
}
